<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <link rel="icon"   href="logo.jpg" />
    <title>方才coding</title>
</head>
<body>
<nav>
    <a href="#">首页</a>
    <a href="#">教程</a>
    <a href="#">关于</a>
</nav>

<div class="content">

    <div class="items">
        <div class="item">
            <h3>1-编程入门学习，请关注我</h3>
            <p>xx编程入门学习xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx</p>
        </div>
        <div class="item">
            <h3>前端学习，请关注我</h3>
            <p>xxx前端学习xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx</p>
        </div>
        <div class="item">
            <h3>后端学习，请关注我</h3>
            <p>xxx前端学习xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx</p>
        </div>
        <div class="item">
            <h3>编程入门学习，请关注我</h3>
            <p>xx编程入门学习xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx</p>
        </div>
        <div class="item">
            <h3>前端学习，请关注我</h3>
            <p>xxx前端学习xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx</p>
        </div>
        <div class="item">
            <h3>后端学习，请关注我</h3>
            <p>xxx前端学习xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx</p>
        </div>
        <div class="item">
            <h3>编程入门学习，请关注我</h3>
            <p>xx编程入门学习xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx</p>
        </div>
        <div class="item">
            <h3>前端学习，请关注我</h3>
            <p>xxx前端学习xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx</p>
        </div>
        <div class="item">
            <h3>后端学习，请关注我</h3>
            <p>xxx前端学习xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx</p>
        </div>
    </div>

    <div class="sidebar">
        <h4>学习编程关注我</h4>
        <img src="cover.jpg" alt="logo">
    </div>

</div>

</body>
<style>
    body {
        background-color: #f5f5f5;
    }

    nav {
        position: fixed;
        width: 100%;
        top: 0;
        left: 0;
        z-index: 10;
        background-color: cornflowerblue;
        height: 40px;
        text-align: center;
        align-content: center;

    }

    nav a {
        color: black;
        text-decoration: none;
        padding: 10px;
        font-size: 18px;
    }

    nav a:hover {
        background-color: gold;
    }

    .content {
        /*justify-content: center;*/
        top: 40px;
        max-width: 1290px;
        display: flex;
        margin: 50px auto;
    }

    .items {
        width: 100%;
        background-color: #fff;
        border-radius: 10px;
        box-shadow: 0 0 10px #ccc;
        overflow: hidden;
        cursor: pointer;
    }

    .item {
        border-bottom: #8b949e 1px solid;
        padding: 10px;
    }

    .item :hover {
        color: gold;
    }

    .sidebar {
        position: sticky;
        top: 50px;
        margin-left: 10px;
        z-index: 11;
        padding-top: 1px;
        max-width: 250px;
        max-height: 320px;
        text-align: center;
        background-color: white;
        border-radius: 10px;
        box-shadow: 0 0 10px #ccc;
    }

    .sidebar h4 {
        margin: 10px 0;
    }

    .sidebar img {
        width: 80%;
        height: 80%;
    }

    @media screen and(max-width: 768px) {
        .sidebar {
            display: none;
        }

        nav {
            text-align: left;
            align-content: center;
        }
    }
</style>
</html>